﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _98求数组最大值
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int[] array = { 8, 4, 6, 1, 9, 3, 4 };

            int max = array[0];//假设第0个元素是最大的
            for (int i = 1; i < array.Length; i++)
            {
                if (array[i] > max)
                {
                    max = array[i];
                }
            }
            Console.WriteLine(max);
        }
    }
}